<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    var arr = [21,13,17,34,5,17,19]
    console.log(arr.lastIndexOf(17)) // 2
</script>
</html>